package cn.tedu.submarine;
//战舰
import javax.swing.*;
import java.util.Random;

public class Battleship extends SeaObject{

   private int life;

   public Battleship(){
        super(66,26,270,124,20);
        life = 5;

    }
   public void step(){
    }
    public ImageIcon getImage(){
        return Images.battleship;

    }
    public Bomb shootBomb(){
       return new Bomb(this.x,this.y);
    }
    public void moveLeft(){
       x -= speed;
    }
    public void moveRight(){
       x += speed;
    }
    public void addLife(int life){
       this.life+=life;

    }
    public int getLife(){
       return life;
    }
    public void subtractLife(){
       life--;
    }
}
